Skip to content

Conversation

leemthompo
Copy link
Contributor

Flagged by @dadoonet in Slack:

There's an interesting discussion on discuss about Lucene regex support.
Our documentation says things like:

  • [a-c] # matches 'a', 'b', or 'c'
  • [^a-c] # matches any character except 'a', 'b', or 'c'

Which is correct unless you use as well case_insensitive: true option. In which case you would expect B to match [a-c]. But it does not work that way and it's a known limitation as Robert answered in apache/lucene#14378 (comment).

Flagged by @dadoonet in Slack:

> Hey team. There's an interesting discussion on discuss about Lucene regex support.
Our documentation says things like:
[a-c]   # matches 'a', 'b', or 'c'
[^a-c]  # matches any character except 'a', 'b', or 'c'
Which is correct unless you use as well case_insensitive: true option. In which case you would expect B to match [a-c]. But it does not work that way and it's a known limitation as Robert answered in apache/lucene#14378 (comment).
Could we document that somehow?
Copy link
Contributor

Documentation preview:

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-docs (Team:Docs)

leemthompo added a commit that referenced this pull request Mar 21, 2025
Copy link
Contributor

@dadoonet dadoonet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@leemthompo leemthompo merged commit ab8b1f0 into 8.x Mar 21, 2025
7 checks passed
@leemthompo leemthompo deleted the leemthompo-patch-4 branch March 21, 2025 16:32
leemthompo added a commit that referenced this pull request Mar 21, 2025
* Update regexp-syntax.md

9.x equivalent of #125412

* use md syntax
leemthompo added a commit to leemthompo/elasticsearch that referenced this pull request Mar 21, 2025
elasticsearchmachine pushed a commit that referenced this pull request Mar 21, 2025
… (#125423)

* Update regexp-syntax.md

9.x equivalent of #125412

* use md syntax
smalyshev pushed a commit to smalyshev/elasticsearch that referenced this pull request Mar 21, 2025
omricohenn pushed a commit to omricohenn/elasticsearch that referenced this pull request Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants